<%@ include file="/WEB-INF/jsp/include/head.jsp" %><%@ page language="java" pageEncoding="UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${locale}">
<head>
    <meta http-equiv="Expires" content="0" /> 
    <meta http-equiv="Pragma" content="No-cache" /> 
    <meta http-equiv="Cahe-Control" content="No-cache" />
    <%@ include file="/WEB-INF/jsp/include/title.jsp" %>
    <%//@ include file="/WEB-INF/jsp/include/common_css.jsp" %>
    <link rel="stylesheet" type="text/css" media="screen" href="<c:url value="/css/issue.css"/>"/>
</head>
<body style="width:1024px;  border: 0px solid #ff0033;">
    <div class="blueBar"></div>
    <div class="container">
        <div class="head2">
            <h1>
                <a href="../issue/index.do" class="pageLogo">GeekSaga IssueManager</a>
            </h1>
            <div class="headNav" style="top: 10px;">
                <div>
                    <form action="#" class="navSearch">
                        <div class="uiTypeahead">
                            <div class="wrap">
                                <div class="uiSearchInput">
                                    <input type="text" class="inputtext textInput" value="Search"/>
                                    <button title="Search">
                                      <span>Search</span>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                    <ul class="pageNav">
                        <li>
                            <a href="<c:url value="/issue/index.do"/>">Home</a>
                        </li>
                        <li>
                            <a href="#">Profile</a>
                        </li>
                        <li>
                            <a href="<c:url value="/issue/logout.do"/>">Logout</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="content">
            <div class="mainContent">
                <div class="contentCol" style="float:left; padding: 15px 0">
                    <div style="float:left;">
                        <div class="uiHeaderPage">
	                        <div class="uiHeaderTop">
	                            <i class="uiHeaderImage"></i>
   		                        <h2 class="uiHeaderTitle" style="margin-left: 20px">
	                            New Issue
		                        </h2>
	                        </div>
                        </div>
                        <form:form id="frmIssue" method="post" action="add.do" enctype="multipart/form-data" modelAttribute="issue">
                        <div style="padding: 0; margin: 0 10px 5px;">
                            <div class="UIComposer_InputArea tt">
                                <div id="SAGAEditorBox" class="NewHighLight">
                                    <form:textarea path="issueContent" cssClass="ta" />
                                    <%--form:textarea path="issueContent" cols="75" rows="7" cssClass="WebEditor ta" cssStyle="display: none" readonly="${ param.command == 'REMOVE' ? true : false}" /--%>
                                </div>
                            </div>
                        </div>
                        <div class="UIComposer_ButtonArea" style="display: none">
                            <ul>
                                <li>
                                    <label class="UIComposer_SubmitButton">
                                        <input type="submit" value="Create"/>
                                    </label>
                                </li>
                            </ul>
                        </div>
                        </form:form>
                        <ul>
                           <c:forEach items="${newList}" var="issue" varStatus="status">
                               <li class="pvm uiListVerticalItemBorder uiListItem uiListLight t-1">
                                   <div class="pic">
                                       <img src="<c:url value="/img/no_profile_picture.gif"/>" width="120" height="120" />
                                   </div>
                                   <div style="margin-right: 10px; margin-top: 10px; width: 580px; float:right;">
	                                   <c:if test="${issue.issueState == 'B00601'}">
	                                   <label class="registIcon"></label>
	                                   </c:if>
                                       - ${issue.issueTitle} <br />
                                       ${issue.issueContent}
                                       <a href="<c:url value="/issue/view.do?sid=${issue.sid}&amp;currentPage=${param.currentPage}"/>">More</a>
                                       ${issueState[issue.issueState]} <br />
                                       ${issuePriority[issue.issuePriority]}
                                       <c:if test="${issue.memoCnt > 0}">
                                        <img src="<c:url value="/img/skin/default/i_memo.gif"/>" class="pw_bsc" />
                                        <span class="pw_added">${issue.memoCnt}</span>
                                    </c:if>
                                   </div>
                                   <div style="text-align: left; float:left; margin-left: 15px; margin-top: 140px; margin-bottom: 10px; position:absolute;">
                                   <div class="userName">
                                   <c:choose>
                                   <c:when test="${not empty issue.userSid}">
                                       <b>${issue.user.nickName}</b>
                                   </c:when>
                                   <c:otherwise>
                                       <b>${issue.userNick}</b>
                                   </c:otherwise>
                                   </c:choose>
                                   </div>
                                   ${issue.modifyDate} ${issue.modifyTime}<br />
                                   </div>
                               </li>
                           </c:forEach>
                        </ul>
                    </div>
                    <div style="float:left;">
                        <div class="uiHeaderPageh4">
                            <div class="uiHeaderTop">
                                <h4 class="uiHeaderh4">
                                Processing
                                </h4>
                            </div>
                        </div>
                        <ul>
                           <c:forEach items="${processList}" var="issue" varStatus="status">
                            <li class="uiListItem2 t">
                                <div class="pic-1">
                                    <img src="<c:url value="/img/no_profile_picture.gif"/>" width="67" height="67" />
                                </div>
                                <div style="margin-right: 10px; margin-top: 10px; width: 140px; float:right;">
                                <c:if test="${issue.issueState == 'B00603'}">
                                <label class="successIcon"></label>
                                </c:if>
                                <c:if test="${issue.issueState == 'B00602'}">
                                <label class="processIcon"></label>
                                </c:if>
                                <div class="userName">
                                <c:choose>
                                <c:when test="${not empty issue.userSid}">
                                    <b>${issue.user.nickName}</b>
                                </c:when>
                                <c:otherwise>
                                    <b>${issue.userNick}</b>
                                </c:otherwise>
                                </c:choose>
                                </div>
                                    ${issue.issueTitle}<br />
                                <div style="overflow: hidden; height: 28px;">${issue.issueContent}</div>
                                ${issue.modifyDate} ${issue.modifyTime} - <a href="<c:url value="/issue/view.do?sid=${issue.sid}"/>">More</a>
                                <c:if test="${issue.memoCnt > 0}">
                                    <img src="<c:url value="/img/skin/default/i_memo.gif"/>" class="pw_bsc" />
                                    <span class="pw_added">${issue.memoCnt}</span>
                                </c:if>
                                </div>
                            </li>
                           </c:forEach>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
           
        <div style="clear: both; height: 10px;"></div>
               
        <div style="border: 0px solid #B3B3B3">
            <c:forEach items="${projectList}" var="project" varStatus="status">
            <div style="float:left; position: relative;" class="uiListItem3 t1">
                <a href="<c:url value="/spec/list.do?projectCode=${project.projectCode}"/>">${project.projectName}</a>
                ${project.projectVersion}
                ${projectState[project.projectState]}
                ${project.projectStart}
                ${project.projectEnd}
            </div>
            </c:forEach>
        </div>
        <div style="clear:both; margin-top: 8px; padding-top:6px; border-top:1px solid #B3B3B3">GeekSaga @2010</div>
    </div>
    <%@ include file="/WEB-INF/jsp/include/common_script.jsp" %>
    <script type="text/javascript" src="<c:url value="/js/editor/editor.js"/>"></script>
    <script type="text/javascript">
    //<![CDATA[
        $("#issueContent").focusin(function() {
            $(this).removeClass("ta");
            $(this).addClass("tae");
            $(this).text("");

            $(".UIComposer_ButtonArea").show();
        });
        
        $("body").click(function(event) {
	       	$("#issueContent").removeClass("tae");
	        $("#issueContent").addClass("ta");
	        
            if($(event.target).is("input[type=submit]")) {
	            $("#issueContent").text("What's on your issue?");
            } else {
	            $(".UIComposer_ButtonArea").hide();
            }
            //$(this).text("What's on your issue?");
        });

        /*$(window).load(function () {
            $("#issueContent").editor({
                id : "issueContent",
                isLoad : true,
                scriptUrl : "",
                plugins : "empty",
                buttons : "bold,italic"
            });
        });*/
    //]]>
    </script>
</body>
</html>